/* eslint-disable camelcase */
import http from '@/utils/request'
/**
 * 不感兴趣的接口
 * @param {*} target
 * @returns
 */
export const reqDisLikeArticle = (target) => http({
  url: '/v1_0/article/dislikes',
  method: 'post',
  data: {
    target
  }
})

/**
 * 举报文章
 * @param {*} target 文章编号
 * @param {*} type 举报类型编号
 */
export const reqReportArticle = (target, type, remark = '') => {
  return http({
    method: 'post',
    url: '/v1_0/article/reports',
    data: {
      target,
      type,
      remark
    }
  })
}

/**
 * 根据文章编号来获取文章详情
 * @param {*} id 文章编号
 */
export const reqGetArticleInfo = id => {
  return http({
    method: 'GET',
    url: '/v1_0/articles/' + id
  })
}
